#include <57header.h>

int main(int argc,char*argv[])
{
    int fd = open("1.txt", O_RDWR);

    pid_t pid = fork();

    if(pid == 0){
        // 子进程走到这
        write(fd, "son1",4);
        sleep(1);
        write(fd, "son2",4);
    }else{
        // 父进程走到这
        write(fd, "main1",5);
        sleep(1);
        write(fd, "main2",5);
    }
    return 0;
}

